﻿<UserControl x:Class="Matchingo.Modules.TitleScreenModule.Views.TitleScreenView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"              
    xmlns:Matchingo_TitleScreenModule="clr-namespace:Matchingo.Modules.TitleScreenModule"
    VerticalAlignment="Center" HorizontalAlignment="Center" 
    mc:Ignorable="d" >
	<UserControl.Resources>
		<Storyboard x:Name="SlideOutUpStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MoveableControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-430" KeySpline="0,0,1,1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="SlideOutRightStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MoveableControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="306" KeySpline="0,0,1,1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="SlideInUpStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MoveableControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="-430"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" KeySpline="0,0,1,1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<LinearGradientBrush x:Key="LogoStrokeBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF555555"/>
			<GradientStop Color="#FFFFFFFF" Offset="1"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="LogoFillBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF09155C" Offset="0"/>
			<GradientStop Color="#FF0A1447" Offset="1"/>
			<GradientStop Color="#FF2132A8" Offset="0.25200000405311584"/>
		</LinearGradientBrush>
		<Storyboard x:Name="SlideInRightStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MoveableControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="306"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" KeySpline="0,0,1,1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="SlideOutLeftStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MoveableControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-305" KeySpline="0,0,1,1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="SlideInLeftStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MoveableControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="-305"/>
				<SplineDoubleKeyFrame KeySpline="1,1,1,1" KeyTime="00:00:00.5000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
    
	<Canvas x:Name="LayoutRoot" 
		    Width="360" Height="430" RenderTransformOrigin="0.5,0.5">
		<Canvas.RenderTransform>
			<TransformGroup>
				<ScaleTransform/>
				<SkewTransform/>
				<RotateTransform/>
				<TranslateTransform/>
			</TransformGroup>
		</Canvas.RenderTransform>
		<Grid Height="414" Width="238" Canvas.Left="63" Canvas.Top="8" x:Name="MoveableControl" RenderTransformOrigin="0.5,0.5">
			<Grid.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Grid.RenderTransform>
			<Grid Margin="0,52,0,0">
				<Grid.OpacityMask>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#00FF0000"/>
						<GradientStop Color="#FFFF0000" Offset="0.031"/>
						<GradientStop Color="#FFFF0000" Offset="0.729"/>
						<GradientStop Color="#00000000" Offset="1"/>
					</LinearGradientBrush>
				</Grid.OpacityMask>
				<Rectangle Margin="26,0,26,0" Stroke="#FF000000">
					<Rectangle.Fill>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF2A3F71"/>
							<GradientStop Color="#FF08183F" Offset="0.676"/>
							<GradientStop Color="#FF2A3F71" Offset="1"/>
						</LinearGradientBrush>
					</Rectangle.Fill>
				</Rectangle>
				<Rectangle Width="26" Stroke="#FF000000" HorizontalAlignment="Right">
					<Rectangle.Fill>
						<LinearGradientBrush EndPoint="0.809,0.503" StartPoint="-0.095,0.503">
							<GradientStop Color="#FF999999"/>
							<GradientStop Color="#FFFFFFFF" Offset="0.132"/>
							<GradientStop Color="#FF8D8D8D" Offset="1"/>
							<GradientStop Color="#FFF9F9F9" Offset="0.854"/>
						</LinearGradientBrush>
					</Rectangle.Fill>
				</Rectangle>
				<Rectangle Width="26" Stroke="#FF000000" HorizontalAlignment="Left">
					<Rectangle.Fill>
						<LinearGradientBrush EndPoint="0.809,0.503" StartPoint="-0.095,0.503">
							<GradientStop Color="#FF999999"/>
							<GradientStop Color="#FFFFFFFF" Offset="0.132"/>
							<GradientStop Color="#FF8D8D8D" Offset="1"/>
							<GradientStop Color="#FFF9F9F9" Offset="0.854"/>
						</LinearGradientBrush>
					</Rectangle.Fill>
				</Rectangle>
			</Grid>
			<StackPanel Margin="30,84.5,30,104.5">
				<Button Height="48" Margin="0,0,0,10" FontSize="22" Content="New Game" x:Name="NewGameButton" Click="NewGame_Clicked" Opacity="1" Foreground="#FF000000" Cursor="Hand" />
				<Button Height="48" Margin="0,0,0,10" FontSize="22" Content="Options" x:Name="OptionsButton" Click="Options_Clicked" Opacity="1" Foreground="#FF000000" Cursor="Hand"/>
				<Button Height="48" Margin="0,0,0,10" FontSize="22" Content="High Scores" x:Name="HighScoresButton" Click="HighScores_Clicked" Opacity="1" Foreground="#FF000000" Cursor="Hand"/>
				<Button Height="48" Margin="0,0,0,10" FontSize="22" Content="About" x:Name="AboutButton" Click="About_Clicked" Opacity="1" Foreground="#FF000000" Cursor="Hand"/>
			</StackPanel>
			<TextBox x:Name="PlayerNameTextbox"
				Height="30" TextWrapping="Wrap" 
                MaxLength="20"
				Text="{Binding Path=PlayerName}" Background="#FFFFFFFF" FontSize="18" Margin="41,0,41,30" d:LayoutOverrides="Height" VerticalAlignment="Bottom"/>
			<TextBlock FontSize="20" Foreground="#FFFFFFFF" Text="Player Name" TextWrapping="Wrap" VerticalAlignment="Bottom" Height="Auto" Margin="43,0,39,58" TextAlignment="Center"/>
		</Grid>
		<Grid Height="40" Canvas.Top="22" Canvas.Left="63" Width="238" x:Name="TitleGridButton" RenderTransformOrigin="0.5,0.5" Cursor="Hand">
			<Grid.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Grid.RenderTransform>
			<Path Margin="-59,-22,-55,4" Stretch="Fill" StrokeThickness="2" Data="M1,4 C1,2.3431458 2.3431458,1 4,1 L336,1 C337.65686,1 339,2.3431458 339,4 L320.00003,54 C320.00003,55.656853 311.65689,57 310.00003,57 L30.000002,57 C28.343145,57 22.000002,55.656853 22.000002,54 z" x:Name="MenuMainBody">
				<Path.Stroke>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFFFFFFF"/>
						<GradientStop Color="#FF7E7E7E" Offset="1"/>
					</LinearGradientBrush>
				</Path.Stroke>
				<Path.Fill>
					<LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
						<GradientStop Color="#FF8C8C8C"/>
						<GradientStop Color="#FF828282" Offset="1"/>
						<GradientStop Color="#FF7A7A7A" Offset="0.719"/>
						<GradientStop Color="#FFBDBDBD" Offset="0.103"/>
						<GradientStop Color="#FFD2D2D2" Offset="0.929"/>
					</LinearGradientBrush>
				</Path.Fill>
			</Path>
			<Grid Margin="-82.872,-21.144,56.872,12.144" x:Name="Logo" RenderTransformOrigin="0.5,0.5">
				<Grid.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="1"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Grid.RenderTransform>
				<Grid Margin="75.875,3.799,-63.875,-3.799" x:Name="Logo_Copy">
					<Rectangle Fill="{StaticResource LogoFillBrush}" HorizontalAlignment="Left" Margin="0,0.004,0,0.996" Width="48" StrokeThickness="2">
						<Rectangle.Stroke>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF616161" Offset="0.352"/>
								<GradientStop Color="#FFFFFFFF" Offset="1"/>
							</LinearGradientBrush>
						</Rectangle.Stroke>
					</Rectangle>
					<Rectangle HorizontalAlignment="Left" Margin="45.741,16.001,0,0.999" Width="32" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2"/>
					<Rectangle HorizontalAlignment="Left" Margin="87.746,16.001,0,0.999" Width="32" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2"/>
					<Rectangle Margin="117.746,16.001,102.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2"/>
					<Rectangle Margin="0,16.001,90.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" HorizontalAlignment="Right" Width="14.255" d:LayoutOverrides="Width"/>
					<Rectangle Margin="0,16.001,60.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" HorizontalAlignment="Right" Width="32"/>
					<Rectangle Margin="0,16.001,30.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" HorizontalAlignment="Right" Width="32"/>
					<Rectangle Margin="0,16.001,0.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" HorizontalAlignment="Right" Width="32"/>
					<Path HorizontalAlignment="Left" Margin="13.51,15.012,0,-0.012" Width="2" Fill="#FFFF0000" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M-55,4.0000024 L-55,28.003376"/>
					<Path HorizontalAlignment="Left" Margin="29.51,15.012,0,-0.012" Width="2" Fill="#FFFF0000" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M-38.999996,28.000006 L-38.999996,4.0000024"/>
					<Path Height="10" HorizontalAlignment="Left" Margin="61.022,0,0,0.047" VerticalAlignment="Bottom" Width="2" Fill="#FFFF0000" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M-14.999998,20.000004 L-14.999998,28.000006"/>
					<Path HorizontalAlignment="Left" Margin="61.022,22.953,0,16.047" Width="2" Fill="#FFFF0000" Stretch="Fill" StrokeThickness="2" Data="M-14.999998,4.0000024 L-14.999998,12.000004">
						<Path.Stroke>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF5E5E5E"/>
								<GradientStop Color="#FFADADAD" Offset="1"/>
							</LinearGradientBrush>
						</Path.Stroke>
					</Path>
					<Path HorizontalAlignment="Left" Margin="69.745,0,0,1" Width="26" Fill="{StaticResource LogoFillBrush}" Stretch="Fill" StrokeThickness="2" Data="M6.9999986,1 L19,1 L19,6.9999981 L25,6.9999981 L25,16.999998 L18.999998,16.999998 L18.999998,46.999996 L6.9999981,46.999996 L6.9999981,16.999998 L1,16.999998 L1,6.9999981 L6.9999986,6.9999981 z" x:Name="T">
						<Path.Stroke>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF484848" Offset="0.373"/>
								<GradientStop Color="#FFFFFFFF" Offset="1"/>
							</LinearGradientBrush>
						</Path.Stroke>
					</Path>
					<Path HorizontalAlignment="Left" Margin="101.746,23.001,0,7.999" Width="2" Fill="#FFFF0000" Stretch="Fill" StrokeThickness="2" Data="M25,4 L25,20">
						<Path.Stroke>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF7C7C7C"/>
								<GradientStop Color="#FFDBDBDB" Offset="1"/>
							</LinearGradientBrush>
						</Path.Stroke>
					</Path>
					<Path Height="2" HorizontalAlignment="Left" Margin="101.746,0,0,15.999" VerticalAlignment="Bottom" Width="18" Fill="#FFFF0000" Stretch="Fill" Stroke="#FF9DA3AE" StrokeThickness="2" Data="M41,12 L25,12"/>
					<Path HorizontalAlignment="Right" Margin="0,15.001,117.254,19.999" Width="2" Fill="#FF94C7CE" Stretch="Fill" StrokeThickness="2" Data="M56.999996,-4 L56.999996,4">
						<Path.Stroke>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF5B5B5B"/>
								<GradientStop Color="#FF7B7B7B" Offset="1"/>
							</LinearGradientBrush>
						</Path.Stroke>
					</Path>
					<Path Height="13.945" HorizontalAlignment="Right" Margin="0,0,117.254,-0.001" VerticalAlignment="Bottom" Width="2" Fill="#FF94C7CE" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M56.999996,28 L56.999996,20"/>
					<Rectangle Height="16" HorizontalAlignment="Right" Margin="0,0.001,90.254,0" VerticalAlignment="Top" Width="14.256" Fill="{StaticResource LogoFillBrush}" StrokeThickness="2" d:LayoutOverrides="Width">
						<Rectangle.Stroke>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF484848" Offset="0"/>
								<GradientStop Color="#FF9B9B9B" Offset="1"/>
							</LinearGradientBrush>
						</Rectangle.Stroke>
					</Rectangle>
					<Path Height="18" HorizontalAlignment="Right" Margin="0,0,81.254,-0.001" VerticalAlignment="Bottom" Width="2" Fill="#FF3FAFBE" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M97,12 L97,28"/>
					<Path HorizontalAlignment="Right" Margin="0,15.001,70.254,15.999" Width="2" Fill="#FF3FAFBE" Stretch="Fill" StrokeThickness="2" Data="M113,12 L113,-4">
						<Path.Stroke>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF595959"/>
								<GradientStop Color="#FFA9A9A9" Offset="1"/>
							</LinearGradientBrush>
						</Path.Stroke>
					</Path>
					<Path Height="10" HorizontalAlignment="Right" Margin="0,0,45.746,10.001" VerticalAlignment="Bottom" Width="2" Fill="#FF3FAFBE" Stretch="Fill" StrokeThickness="2" Data="M137,12 L137,20">
						<Path.Stroke>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF7F7F7F"/>
								<GradientStop Color="#FFB9B9B9" Offset="1"/>
							</LinearGradientBrush>
						</Path.Stroke>
					</Path>
					<Path Height="2" HorizontalAlignment="Right" Margin="0,0,29.746,18.001" VerticalAlignment="Bottom" Width="18.824" Fill="#FF3FAFBE" Stretch="Fill" Stroke="#FF9C9FA5" StrokeThickness="2" Data="M153,12 L136.17584,12" d:LayoutOverrides="Width"/>
					<Path HorizontalAlignment="Right" Margin="0,23.001,15.254,7.999" Width="2" Fill="#FF3FAFBE" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M169,4 L169,20"/>
					<Path Height="8.001" HorizontalAlignment="Right" Margin="0,0,42,10.999" VerticalAlignment="Bottom" Width="6.078" Fill="#FF3FAFBE" Stretch="Fill" Stroke="#FF9C9FA5" StrokeThickness="2" Data="M153,12 L136.17584,12" d:LayoutOverrides="Width, Height"/>
				</Grid>
			</Grid>
			<Matchingo_TitleScreenModule:RotatingMenuButton Margin="249,-4.708,-37,18.708" x:Name="MenuButtonRight" d:LayoutOverrides="VerticalAlignment" IsHitTestVisible="False"/>
			<Matchingo_TitleScreenModule:RotatingMenuButton Margin="-37.428,-4.708,0,18.708" x:Name="MenuButtonLeft" IsHitTestVisible="False" HorizontalAlignment="Left" Width="26"/>
		</Grid>
	</Canvas>
	
</UserControl>
